package jp.eisbahn.mgapi.api.photo;

import org.json.simple.JSONObject;

/**
 * This model class represents a photo information.
 * @author Yoichiro Tanaka
 */
public class Photo extends AbstractModel {

    /**
     * Initialize this instance.
     * @param newOriginal The JSON object which has the information
     * about a photo.
     */
    protected Photo(final JSONObject newOriginal) {
        super(newOriginal);
    }

    /**
     * Retrieve the album ID.
     * @return The album's ID string.
     */
    public final String getAlbumId() {
        return getPropertyString("albumId");
    }

    /**
     * Retrieve the URL of the large image.
     * @return The URL string.
     */
    public final String getLargeImageUrl() {
        return getPropertyString("largeImageUrl");
    }

    /**
     * Retrieve the mime type.
     * @return The MIME type string.
     */
    public final String getMimeType() {
        return getPropertyString("mimeType");
    }

    /**
     * Retrieve the number of favorites.
     * @return The number of favorites.
     */
    public final int getNumFavorites() {
        return getPropertyInt("numFavorites");
    }

    /**
     * Retrieve the type.
     * @return The type string.
     */
    public final String getType() {
        return getPropertyString("type");
    }

}
